Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[P3][Beta] Fix shiny Pokemon being displayed before shiny colours are loaded #4843

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

PigeonBar
Copy link
Collaborator

What are the changes the user will see?

The game should correctly wait for a shiny Pokemon's colours to be loaded before starting the battle and displaying the Pokemon.

Why am I making these changes?

Fixing a bug recently introduced by #4315.
@podarsmarty You mentioned in your PR #4315 that you "noticed some weirdness with experimental variation loading", would this PR fix those issues?

What are the changes from a developer perspective?

The code for loading shiny sprites now properly awaits this.populateVariantColorCache(...).

How to test the changes?

To simulate sprites taking a long time to load, replace the following line of code:

return fetch(url, init);

with the following line of code:

return new Promise<void>((resolve => setTimeout(() => resolve(), 5000))).then(() => fetch(url, init));

Screenshots/Videos

Before the changes: The game does not wait to load Shiny Etevern
20241110.Before.Fix.Variant.mp4
After the changes: The game waits to load Shiny Etevern
20241110.After.Fix.Variant.mp4

Checklist

  • I'm using beta as my base branch
  • There is no overlap with another PR?
  • The PR is self-contained and cannot be split into smaller PRs?
  • Have I provided a clear explanation of the changes?
  • Have I considered writing automated tests for the issue?
  • [ ] If I have text, did I make it translatable and add a key in the English locale file(s)?
  • Have I tested the changes (manually)?
    • Are all unit tests still passing? (npm run test)
  • Are the changes visual?
    • Have I provided screenshots/videos of the changes?

@podarsmarty
Copy link
Contributor

I don't think it will. Iirc the weirdness I saw was with experimental variant not being loaded properly due to the type of animation and folder path.

@Tempo-anon Tempo-anon added Sprite/Animation For when graphics are incorrect P3 Bug Non gameplay affecting bug. typos, graphical issues, or other minor incorrect interactions. labels Nov 11, 2024
@Tempo-anon Tempo-anon merged commit efa9f11 into pagefaultgames:beta Nov 11, 2024
13 checks passed
@PigeonBar PigeonBar deleted the fix-variant-load branch November 12, 2024 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Bug Non gameplay affecting bug. typos, graphical issues, or other minor incorrect interactions. Sprite/Animation For when graphics are incorrect
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants